<template>
  <div>
    <el-form
      :inline="true"
      ref="carInfo"
      :model="carInfo"
      label-width="100px"
      label-position="right"
    >
      <el-row class="">
        <el-col :span="22">车辆信息</el-col>
      </el-row>
      <el-divider content-position="center"></el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="车牌号:">
            <div>{{carInfo.licensePlateNumber}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="VIN码:">
            <div>{{carInfo.vin}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车型:">
            <div>{{carInfo.carModelName}}</div>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="车辆属性:">
            <div>{{carInfo.carAttribute}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车辆颜色:">
            <div>{{carInfo.carColor}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="当前里程:">
            <div>{{carInfo.mileage}}</div>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="发动机号:">
            <div>{{carInfo.engineNumber}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="注册时间:">
            <div>{{carInfo.createTime}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="保险公司:">
            <div>{{carInfo.companyName}}</div>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="保险投保期:">
            <div>{{carInfo.insureDate}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="保险到期:">
            <div>{{carInfo.insureExpireDate}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="年审到期:">
            <div>{{carInfo.examinedDate}}</div>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="创建日期:">
            <div>{{carInfo.createTime}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="备注:">
            <div>{{carInfo.remark}}</div>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { getClientCarById } from '@/api/after-sale/client/car' // 车辆
import { parseTime } from '@/utils'
export default {
  components: {},
  props: {
    fromdata: {
      type: Object,
      default: () => ({})
    }
  },
  data () {
    return {
      carInfo: {
      },//车辆信息
    }
  },
  async created () {
    const { data } = await getClientCarById(this.fromdata.clientCarId)
    this.carInfo = data
    this.carInfo.insureDate = this.carInfo.insureDate ? parseTime(this.carInfo.insureDate) : ''
    this.carInfo.insureExpireDate = this.carInfo.insureExpireDate ? parseTime(this.carInfo.insureExpireDate) : ''
    this.carInfo.examinedDate = this.carInfo.examinedDate ? parseTime(this.carInfo.examinedDate) : ''
  },
  methods: {
    changeType (item) {
      this.selectedTypeText = item.label;
    },
  },
  mounted () {
  }
}
</script>

<style lang="scss" scoped>
</style>
